Skip to content

Conversation

@jimmidyson
Copy link
Member

Previously there was no way to test transitions that would be
enforced via CEL. This commit fixes that and allows the testing
of CEL transition rules on update, which will be necessary for
some future handlers.

Previously there was no way to test transitions that would be
enforced via CEL. This commit fixes that and allows the testing
of CEL transition rules on update, which will be necessary for
some future handlers.
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds testing helpers to validate update transitions enforced via CEL. Key changes include:

  • Introducing CEL validation in update flows by adding ValidateClusterVariableUpdate and a new validateCEL function.
  • Enhancing JSON schema conversion to support custom validations through XValidations.
  • Updating the test definitions to distinguish between initial and update validation through the introduction of an OldVals field.

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
common/pkg/testutils/openapi/validate.go Adds CEL-based validation logic and update helper functions for cluster variables.
common/pkg/testutils/openapi/convert.go Updates schema conversion to support XValidations integration.
common/pkg/testutils/capitest/variables.go Adjusts test definitions to support update validation using the new OldVals field.
common/go.mod Updates module requirements by adding and removing redundant k8s.io/apiserver dependency.
Comments suppressed due to low confidence (1)

common/pkg/testutils/capitest/variables.go:25

  • [nitpick] Consider renaming 'OldVals' to 'OldValues' for improved clarity and consistency with the 'Vals' field.
OldVals     any

@github-actions
Copy link
Contributor

Automated PR Comment From Black Duck SCA

❌ Found dependencies violating policy!

Policies Violated Dependency License(s) Vulnerabilities Short Term Recommended Upgrade Long Term Recommended Upgrade Resolved / Filtered Out
Unknown github.com/samber/lo (github.com/samber/lo:v1.51.0) Unknown License

@jimmidyson jimmidyson enabled auto-merge (squash) June 16, 2025 17:07
@jimmidyson jimmidyson merged commit 50a97fd into main Jun 17, 2025
39 of 41 checks passed
@jimmidyson jimmidyson deleted the jimmi/add-update-test-functionality branch June 17, 2025 11:35
supershal added a commit that referenced this pull request Jun 24, 2025
🤖 I have created a release *beep* *boop*
---


## 0.30.0 (2025-06-24)

<!-- Release notes generated using configuration in .github/release.yaml
at main -->

## What's Changed
### Exciting New Features 🎉
* feat: Build with Go 1.24.4 to fix CVEs by @jimmidyson in
#1157
* feat: add requests and limits to registry containers by @dkoshkin in
#1158
* feat: Add preflight checks framework by @dlipovetsky in
#1129
* feat: Preflight check opt-out by @dlipovetsky in
#1156
* feat: Nutanix VM image preflight check by @dlipovetsky in
#1130
* feat: update addons by @dkoshkin in
#1168
* feat: Enforce MD replicas within cluster autoscaler bounds by
@jimmidyson in
#1169
* feat(preflight): Storage container checks for Nutanix by
@thunderboltsid in
#1136
* feat: update Nutanix CSI to 3.3.4 by @dkoshkin in
#1179
### Fixes 🔧
* fix: update CNCF registry version to 2.3.4, app version 2.8.3 by
@dkoshkin in
#1150
* fix: registry addon headless service port by @dkoshkin in
#1159
* fix: preserve registry addon root CA on move by @dkoshkin in
#1155
* fix: Add noderegistration patch to previous handler by @jimmidyson in
#1177
### Other Changes
* build: include regclient/regsync image for registry addon by @dkoshkin
in
#1148
* test: Add update test helpers by @jimmidyson in
#1162
* test(e2e): Nutanix 1.33.1 testing by @jimmidyson in
#1164
* build: Update all tools by @jimmidyson in
#1165
* refactor: add global feature.Gates variable by @dkoshkin in
#1167
* ci: new env variable to set --feature-gates by @dkoshkin in
#1166
* build: github.com/hashicorp/[email protected] to fix CVE by
@jimmidyson in
#1170
* docs: Update link to default Cilium values in cni.md by
@yannickstruyf3 in
#1173
* docs: Fix up Cilium config link (again) & icons by @jimmidyson in
#1176

## New Contributors
* @yannickstruyf3 made their first contribution in
#1173

**Full Changelog**:
v0.29.0...v0.30.0

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Shalin Patel <[email protected]>
jimmidyson added a commit that referenced this pull request Jun 25, 2025
This commit allows users to configure kube-proxy mode when
creating clusters. This is enforced via CEL to prevent users
from moving between kube-proxy and non-kube-proxy deployments.

Supports `iptables` (default), and `nftables` modes.

Skipping `kube-proxy` deployment and management by CAPI is enabled
via setting the upstream `controlplane.cluster.x-k8s.io/skip-kube-proxy`
annotation on the `Cluster`
`spec.topology.controlPlane.metadata.annotation`.
This will configure `kubeadm` to skip the `addon/kube-proxy` phase.

Follow up work will allow Cilium configuration to enable their
kube-proxy replacement (already possible via custom Helm values)
and migration from kube-proxy to kube-proxy replacement for
existing clusters.

Requires #1162.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants